package com.shanks.home.module.android;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

import com.shanks.home.MainActivity;
import com.shanks.home.R;

public class AndroidActivity extends Activity {
	private Button timeBtn;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		this.setContentView(R.layout.android_activity);
		
		initView();
	}
	
	private void initView() {
		timeBtn = (Button)this.findViewById(R.id.android_time_btn);
		
		timeBtn.setOnClickListener(onClickListener);
	}
	
	private OnClickListener onClickListener = new OnClickListener() {
		
		@Override
		public void onClick(View v) {
			if (v == timeBtn) {
				startActivity(new Intent(AndroidActivity.this, TimeActivity.class));
			}
		}
	};
}